import request from '@/utils/request'

// 获取产品列表
export function getProjectList(data) {
  return request({
    url: '/site/project/list',
    method: 'post',
    data
  })
}

// 获取产品信息
export function getProjectInfo(id) {
  return request({
    url: '/site/project/info?id=' + id,
    method: 'get'
  })
}

// 保存产品信息
export function saveProjectInfo(data) {
  return request({
    url: '/site/project/save',
    method: 'post',
    data
  })
}

// 删除产品信息
export function deleteProjectInfo(id) {
  return request({
    url: '/site/project/delete?id' + id,
    method: 'delele'
  })
}

// 发布产品
export function release(id) {
  return request({
    url: '/site/project/release?id=' + id,
    method: 'post'
  })
}


// 获取产品权限
export function getProjectPermission(id) {
  return request({
    url: '/site/project/getPermissions?id=' + id,
    method: 'get'
  })
}

// 授权
export function authoriza(data) {
  return request({
    url: '/site/project/authoriza',
    method: 'post',
    data
  })
}
